<?php
/**
 * Created by JetBrains PhpStorm.
 * User: TongBC
 * Date: 2014/7/14
 */
include('../common/autoload.php');
use pft\Member\MemberAccount;
$action = trim($_REQUEST['action']);
$token = $_REQUEST['token'];
$soap = SoapInit::GetSoapInside();
$mem = new MemberAccount($GLOBALS['le'], $_SESSION['memberID']);
switch($action) {
    case 'getDistributor':
		$sql="SELECT id,dname,getPY(dname,1) as py,account FROM pft_member WHERE dtype=0 AND status=0 ORDER BY py ASC";
		$GLOBALS['le']->query($sql);
		$tmp = array();
		while($row=$GLOBALS['le']->fetch_assoc()){
			$tmp[$row['id']]=$row;
		}
		echo serialize($tmp);
        break;
    default:break;
}

